package Interceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.eclipse.jetty.server.session.JDBCSessionManager.Session;

import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;
import com.jfinal.core.Controller;
import com.jfinal.plugin.activerecord.Model;

public class LoginInterceptor implements Interceptor {

	@Override
	public void intercept(Invocation inv) {
		System.out.println("Before method invoking");
		if(inv.getController().getSessionAttr("bi_user") != null){
			inv.invoke();		
		}else{
			System.out.println("拦截器已拦截！");
		}
		System.out.println("After method invoking");
	}

}
